
public interface IMessage {

	public final int PUTDATA = 1;
	public final int GETDATA = 2;
	public final int PUTDATA_RESPONSE = 3;
	public final int GETDATA_RESPONSE = 4;
	public final int MESSAGE_FROM_MASTER = 5;
	public final int CLIENT_INQUIRE = 6;
	public final int MESSAGE_FROM_SLAVE = 7;
	public final int CLIENT_INQUIRE_FOR_NEWDATA = 8;
	public final int CLIENT_INQUIRE_RESPONSE = 9;
	public final int CLIENT_TERMINATE = 10;
	
	public byte[] serialize();
	public IMessage deserialize(byte[] data);
	
	public int getMessageID();
	public void setMessageID(int messageId);
	public IMachine getSource();
	public IMachine getDest();
	public void setSource(IMachine machine);
	public void setDest(IMachine machine);
	
	public DataObject getKey();
	public DataObject getValue();
	public void setKey(DataObject key);
	public void setValue(DataObject value);
}
